#ifndef _sbrush_errors_h_
#define _sbrush_errors_h_

#include <string>

namespace sbrush {
	class AcsError {
	public:
		AcsError(const std::string& msg) 
		:	m_Message(msg)
		{
		}
		
		virtual ~AcsError() throw() {
		}
		
		const char* what() const {
			return m_Message.c_str();
		}
		
	private:
		std::string m_Message;
	};
	
	class NullPtr : public AcsError {
	public:
		NullPtr() 
		:	AcsError("null pointer")
		{
		}
		
		virtual ~NullPtr() throw() {
		}
	};
	
	class CorruptStream : public AcsError {
	public:
		CorruptStream()
		:	AcsError("corrupt stream")
		{
		}
		
		virtual ~CorruptStream() throw() {
		}
	};
	
	class FailedAlloc : public AcsError {
	public:
		FailedAlloc()
		:	AcsError("failed alloc")
		{
		}
		
		virtual ~FailedAlloc() throw() {
		}
	};
		
}


#endif